package lesson14;

import java.util.Scanner;

public class AuctionDemo 
{
	/*
	 * Create an auction. The auction can have N cars.
	 * The auction can have up to 6 cars for sale.
	 * The auction can have up to 5 participants to buy.
	 * The auction opens.
	 * Each participant can buy 1 or 2 cars.
	 * Each participant decides weather to buy a car by a random boolean value.
	 * cars can be bought only once.
	 * If no other cars are left in the auction, the remaining participants go home.
	 * After all participants have decided OR all cars are sold, the auction closes.
	 * If after all sales there are still cars left, the cars are scrapped.
	 * 
	 * Input: number of cars, number of participants.
	 * Output: 1: All participants that bought a car and the model of their cars.
	 * 		   2: All scrapped cars if any.
	 * 
	 * for(int i = 0; i < 10; i++)
	 * {
	 * 		int random = (int)Math.round(Math.random() + 1);
	 * 		if(random == 1)
	 * 		{
	 * 			buy = true;
	 * 		}
	 * 		else
	 * 		{
	 * 	
	 * 		}
	 * }
	 * 
	 * 
	 */
	
	
	public static void main(String[] args) 
	{
		Auction auction = new Auction();
		Scanner sc = new Scanner(System.in);
		System.out.println("Enter number of cars: ");
		int numberOfCars = sc.nextInt();
		System.out.println("Enter number of buyers: ");
		System.out.println("Enter 1 for start");
		int startAuction = sc.nextInt();
		if( startAuction == 1)
		{
			auction.startAuction();
		}
	}	
}
